// API 响应基础类型
export interface ApiResponse<T = any> {
  code: number
  message: string
  data: T
  success: boolean
}

// 登录相关类型
export interface LoginRequest {
  userName: string
  password: string
}

export interface LoginResponse {
  token: string
  userInfo: {
    [key: string]: any
  }
}

// 文章相关类型
export interface Article {
  id: number
  organization: string
  title: string
  publishDate: string
  contentType: string
  lastUpdateTime: string
  viewCount: number
  avgViewDuration: string
  likes: number
  favorites: number
  comments: number
  shares: number
  followers: number
  totalInteractions: number
  isFirstLaunch: boolean
  status: number
  firstLaunchDate: string
  preInteractions: number
  newInteractions: number
  openingAmount: string
}

export interface ArticleListRequest {
  page?: number
  pageSize?: number
  keyword?: string
  status?: number
  organization?: string
}

export interface ArticleListResponse {
  list: Article[]
  total: number
  page: number
  pageSize: number
}

export interface ArticleEditRequest {
  id: number
  openingAmount: string
}

export interface ArticleAuditRequest {
  id: number
  status: number
  remark?: string
}

export interface ArticleBatchImportRequest {
  file: File
  organization?: string
}

// 分页参数
export interface PaginationParams {
  page: number
  pageSize: number
}

// 通用列表响应
export interface ListResponse<T> {
  list: T[]
  total: number
  page: number
  pageSize: number
}